function [q_swap] = apply_relabel(q)
% 
% R1 = [1  0  1  1  1 -1 -1 -1  0;
%       0  0  0  0  0  0  0  0 -1;
%       0  0  0  0  0  0  0  1  0;
%       0  0  0  0  0  0  1  0  0;
%       0  0  0  0  0  1  0  0  0;
%       0  0  0  0  1  0  0  0  0;
%       0  0  0  1  0  0  0  0  0;
%       0  0  1  0  0  0  0  0  0;
%       0 -1  0  0  0  0  0  0  0;];
%   
R1 = [1 1 1 1 -1 -1 -1;
      0 0 0 0  0  0  1;
      0 0 0 0  0  1  0;
      0 0 0 0  1  0  0;
      0 0 0 1  0  0  0;
      0 0 1 0  0  0  0;
      0 1 0 0  0  0  0;
    ];


q_swap = R1 * q;

end
